﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>留言中心 - {site.Name}</title>
<script type="text/javascript" src="{site.Dir}_data/SysConfig.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery-min.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery.jtemplates.js"></script>
<script type="text/javascript" src="{site.Dir}scripts/jumbotcms.js?v4"></script>
<script type="text/javascript" src="{site.Dir}scripts/front.js"></script>
<script type="text/javascript" src="{site.Dir}_data/style/extends.js"></script>
<link type="text/css" rel="stylesheet" href="{site.Dir}style/global.css" />
<script type="text/javascript" src="{site.Dir}extends/feedback/styles/common.js"></script>
<link type="text/css" rel="stylesheet" href="{site.Dir}skins/{$SkinPath}/css/global.css" id="cssSkin" />
<link rel="stylesheet" href="images/face/images/face.css" type="text/css"><!--表情样式-->
<script src="images/face/images/face.core.js" type="text/javascript"></script>
<script src="images/face/images/face.js" type="text/javascript"></script>
<style type="text/css">
<!--
/*---------------留言中心*/
.feedbackbar {
	width:{$SkinBodyWidth/1-14}px;
	font-size:12px;
	border:1px solid {$SkinBorderColor};
	margin-top:0px;
}
.feedbackbar .feedbacktitle{
	width:{$SkinBodyWidth/1-16}px;
	height:26px;
	margin:1px auto;
	background:url({site.Dir}skins/{$SkinPath}/images/place_bg.gif) bottom repeat-x;
	border-bottom:1px solid {$SkinBorderColor};
}
.feedbackbar .feedbacktitle .title{
	float:left;
	margin:5px 0px 0px 12px;
	color: {$SkinTitleColor};
	display:inline;
}
.feedbackbar .feedbacktitle .title strong{
	letter-spacing:4px;
	color: {$SkinTitleColor};
	margin-right:10px;
}
.feedbackbar .feedbacktitle .gotopost{
	float:right;
	display:block;
	width:100px;
	height:23px;
}
.feedbackbar .feedbacktitle .gotopost a{
	width:95px;
	height:22px;
	display:inline;
	float:right;
	text-align:center;
	line-height:22px;
	text-decoration:none;
	background:url({site.Dir}publicstyle/gotopost.gif) no-repeat;
	margin:1px 3px 0px 0px;
}
.feedbackbar .feedbackbox{
	width:{$SkinBodyWidth/1-24}px;
	margin:5px auto 0px;
	border:0;
	padding:0px;
}
.feedbackbar .feedbackbox .feedbackbody{
	width:{$SkinBodyWidth/1-34}px;
	margin:5px auto;
	border:1px solid {$SkinBorderColor};
}
.feedbackbar .feedbackbox .left {
	background:{$SkinTintBackground};
}
.feedbackbar .feedbackbox .left dl dt{
	width:100%;
	text-align:left;
	background:{$SkinTintBackground};
	height:25px;
	line-height:25px;
	text-indent:5px;
}
.feedbackbar .feedbackbox .left dl dd{
	padding:10px;
	text-align:center;
	font-size:13px;
	line-height:25px;
}
.feedbackbar .feedbackbox .leftbar {
	width:120px;
}
.feedbackbar .feedbackbox .leftbar li{
	float:left;
	width:60px;
}
.feedbackbar .feedbackbox .leftbar li.message{
	height:25px;
	line-height:25px;
	text-indent:12px;
	background:url({site.Dir}publicstyle/ico_message.gif) 0px 4px no-repeat;
}
.feedbackbar .feedbackbox .leftbar li.friend{
	height:25px;
	line-height:25px;
	text-indent:12px;
	background:url({site.Dir}publicstyle/ico_friend.gif) 0px 4px no-repeat;
}
.feedbackbar .feedbackbox .right dl dt{
	width:100%;
	height:25px;
	line-height:25px;
	text-indent:5px;
	border-bottom:1px dashed {$SkinBorderColor};
}
.feedbackbar .feedbackbox .right dl dt span.a{
	font-size:12px;
	float:left;
}
.feedbackbar .feedbackbox .right dl dt span.b{
	font-size:12px;
	float:right;
	padding-right:10px;
	color:#669933;
	cursor:pointer;
}
.feedbackbar .feedbackbox .right dl dd{
	padding:10px;
	font-size:13px;
	line-height:25px;
}
.feedbackbar .feedbackbox .right .feedbackreply {
	border-top:1px dashed {$SkinBorderColor};
}
.feedbackbar .posttitle{
	width:{$SkinBodyWidth/1-16}px;
	height:26px;
	margin:10px auto;
	background:url({site.Dir}skins/{$SkinPath}/images/place_bg.gif) bottom repeat-x;
	border-top:1px solid {$SkinBorderColor};
	border-bottom:1px solid {$SkinBorderColor};
}
.feedbackbar .posttitle strong{
	letter-spacing:4px;
	color: {$SkinTitleColor};
	display:block;
	margin:7px 0px 0px 13px;
}
.feedbackbar .postbox{
	width:{$SkinBodyWidth/1-16}px;
	margin:5px auto;
}

.feedbackbar .postbox .userbox{
	width:{$SkinBodyWidth/1-47}px;
	margin:5px 0 5px 10px;
}
.feedbackbar .postbox .txtbox{
	width:{$SkinBodyWidth/1-47}px;
	line-height:25px;
	margin:5px 0 5px 10px;
}
.feedbackbar .postbox .userbox dl{
	width:{$SkinBodyWidth/1-47}px;
}
.feedbackbar .postbox .userbox dl dd{
	float:left;
	display:block;
	padding-bottom:2px;
}
.feedbackbar .postbox .txtbox input.title{
	width:230px;
	height:18px;
	border:1px solid {$SkinBorderColor};
	padding:2px 5px 2px 5px;
}
.feedbackbar .postbox .userbox input.username{
	width:100px;
	font-size:13px;
	height:18px;
	border:1px solid {$SkinBorderColor};
	margin-right:10px;
}
.feedbackbar .postbox .userbox input.password{
	width:100px;
	font-size:13px;
	height:18px;
	border:1px solid {$SkinBorderColor};
	margin-right:10px;
}
.feedbackbar .postbox .userbox input.code{
	width:56px;
	font-size:13px;
	height:18px;
	border:1px solid {$SkinBorderColor};
	margin-right:0px;
}
.feedbackbar .postbox .userbox dl dd.mtop{
	margin-left:3px;
}
.feedbackbar .postbox .txtbox textarea {
	border:1px solid {$SkinBorderColor};
	width:99%;
	font-size:13px;
	height:100px;
	margin:0;
	padding:0px 5px 2px 0px;
}
.feedbackbar .postbox .userbox .s{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}skins/{$SkinPath}/images/btn_feedback.gif) no-repeat;
	border:none;
}
.feedbackbar .postbox .userbox .l{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}skins/{$SkinPath}/images/btn_loginin.gif) no-repeat;
	border:none;
}
.feedbackbar .postbox .userbox .r{
	width:63px;
	height:21px;
	margin:0px;
	background:url({site.Dir}skins/{$SkinPath}/images/btn_register.gif) no-repeat;
	border:none;
}
-->
</style>
<script type="text/javascript">
/*
1=技术支持,2=反馈建议,3=投诉意见,4=其他
*/
var classid = q("classid") == "" ? "1" : q("classid");
var classname = "技术支持";
if(classid=="2")
	classname = "反馈建议";
else if(classid=="3")
	classname = "投诉意见";
else if(classid=="4")
	classname = "其他";

var CurrentUserId = "0";
var CurrentAdminId = "0";
(function(){
	$(document).ready(function() {
		$.ajax({
			type:		"get",
			dataType:	"json",
			data:		"time="+(new Date().getTime()),
			url:		site.Dir + "ajax/user.aspx?oper=ajaxUserInfo",
			error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
			success:	function(data){
				//数据绑定
				CurrentUserId = data.userid;
				CurrentAdminId = data.adminid;
				ajaxList(1);
				$(".classname").text(classname);
				$("#feedbackClassId").val(classid);
				if(data.username=="")
				{
					$("#feedbackName").val("匿名游客");
					$(".feedbackName").html("匿名游客");
					$("#guest_btn").show();
				}
				else{
					$("#feedbackName").val(data.username);
					$(".feedbackName").html(data.username);
					$("#guest_btn").hide();
				}
			}
		});
		$('#facecont1 ul').tabs({ fx: { opacity: 'toggle' } });
	});
})();
function ajaxList(page)
{
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"oper=ajaxList&classid="+classid+"&page="+page+"&pagesize="+ajaxPluginFeedbackPageSize+"&time="+(new Date().getTime()),
		url:		site.Dir + "extends/feedback/ajax.aspx",
		error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
		success:	function(d){
			switch (d.result)
			{
			case '0':
				alert(d.returnval);
				break;
			case '1':
				$("#ajaxList").setTemplateElement("tplList", null, {filter_data: false});
				$("#ajaxList").processTemplate(d);
				$("#ajaxPageBar").html(d.pagerbar);
				break;
			}
		}
	});
}
function SelectFace(img)
{
	var facetext="";
	facetext=img.src;
	var pos=facetext.lastIndexOf("/");
	facetext=facetext.substr(pos+1,facetext.length-pos);
	facetext=facetext.replace(".gif","");
	facetext="[img]"+facetext+"[/img]";
	var content=document.getElementById("feedbackContent");
	content.innerHTML += facetext;
}
function ExecuteFace(str)
{
	str=str.replace(/\[img\]QQ(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/QQ/QQ$1.gif\"/>");/*QQ表情*/ 
	//str=str.replace(/\[img\]cc(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/xiaocc/cc$1.gif\"/>");/*悠嬉猴表情*/ 
	//str=str.replace(/\[img\]yc(\S+?)\[\/img\]/ig,"<img src=\"images/face/face_gif/yoyocici/yc$1.gif\"/>");/*洋葱头表情*/ 
	return str; 
}
function hideshow(o){
	var myvar = document.getElementById(o);
	if (myvar.style.display=="none")
	{
		gFace=true;
		myvar.style.display="";
	}else {
		gFace=false;
		myvar.style.display="none";
	}
}
</script>
</head>
<body>
<div class="jbody">
	<div class="topbar">
		<div id="ajaxLoginbar"></div>
		<div class="floatright topurl">
			<script src="{site.Dir}_data/style/topurl.js"></script>
		</div>
	</div>
	<div class="top pbody">
		<div class="toplogo">
			<h1><a href="{site.Url}{site.Dir}">{site.Name}</a></h1>
		</div>
		<div class="topbanner">
			<script src="{site.Dir}_data/style/banner.js"></script>
		</div>
		<div class="toplink">
			<script src="{site.Dir}_data/style/toplink.js"></script>
		</div>
	</div>
	<!--内容-->
	<div class="main pbody">
		<div class="mybody">
			<div class="thispagenav margintop5">
				<div class="title"></div>
				<div class="placenav"> <span>当前位置 :</span> <a href="{site.Url}{site.Dir}">{site.Name}</a> >> 留言中心 >> <span class="classname"></span></div>
			</div>
			<div id="ajaxPluginFeedback">
				<!--留言-->
				<div class="feedbackbar">
					<div class="feedbacktitle">
						<div class="title"> <strong>最新留言</strong></div>
						<div class="gotopost"> </div>
					</div>
					<div class="feedbackbox">
<textarea id="tplList" style="display:none">
{#foreach $T.table as record}
<table class="feedbackbody">
	<tr>
		<td width="150" valign="top" class="left"><dl>
				<dt>{$T.record.username}</dt>
				<dd>
					<div><img src='{site.Dir}avatar/{$T.record.userid}_l.jpg' onerror="this.src='{site.Dir}avatar/0_l.jpg'" border='0' width="100" /></div>
					<div> {#if $T.record.userid != "0" && CurrentUserId !="0" && $T.record.userid != CurrentUserId}
						<ul class="leftbar">
							<li title="发信息给{$T.record.username}" class="message"><a href="javascript:void(0);" onclick="ajaxAddMessage('{$T.record.userid}','{$T.record.username}')">发信息</a></li>
							<li title="加{$T.record.username}为好友" class="friend"><a href="javascript:void(0);" onclick="ajaxAddFriend({$T.record.userid})">加好友</a></li>
						</ul>
						{#/if} </div>
				</dd>
			</dl></td>
		<td valign="top" class="right"><dl>
				<dt>
					<span class="a">留言时间：{$T.record.adddate}</span>
					{#if $T.record.replyuserid == "" || $T.record.replyuserid == "0"}
						{#if CurrentAdminId !="0" && $T.record.userid != CurrentAdminId}
						<span class="b" onclick="ajaxPluginFeedbackReply2({$T.record.id});">回复留言</span>
						{#/if}
					{#/if}
					{#if CurrentAdminId !="0"}
					<span class="b" onclick="ajaxPluginFeedbackDelete({$T.record.id});">删除留言</span>
					{#/if}
				</dt>
				<dd>
					<strong>{$T.record.title}</strong><br />
					<span style="word-break: break-all">{ExecuteFace($T.record.content)}</span>
					{#if $T.record.replyuserid != "" && $T.record.replyuserid != "0"}
						<div class="feedbackreply">
							<font color="#FF5500">{$T.record.replyusername} 的回复 {$T.record.replyadddate}</font> <br />
							<span style="word-break: break-all;"><font color="#FF5500">{ExecuteFace($T.record.replycontent)}</font></span>
						</div>
					{#/if}
				</dd>
			</dl></td>
	</tr>
	
</table>
{#/for} 
</textarea>
						<div id="ajaxList"><img src="{site.Dir}publicstyle/loading/01.gif" border="0"></div>
						<div id="ajaxPageBar" class="pages"></div>
						<div class="floatclear"></div>
					</div>
					<div class="posttitle"> <strong id="posttitle">发表留言</strong></div>
					<form method="post" id="form_feedback" name="form_feedback" action="">
						<div class="postbox">
							<div class="txtbox">
								<input type="hidden" name="feedbackClassId" id="feedbackClassId" value="1">
								<input type="hidden" name="feedbackParentId" id="feedbackParentId" value="0">
								<span class="feedbackName" style="font-weight:bold;"> </span>
								<span id="guest_btn" style="display:none;">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href="{site.LoginUrl}">登录</a>]
										[<a href="{site.RegisterUrl}">注册</a>]
									</span><br />
								留言标题 <input name="feedbackTitle" id="feedbackTitle" type="text" maxlength="50" class="title" /><br />
								
							</div>
							<div class="txtbox">
						<div class="face-div"  id="divFaceShow" onfocusout="hideshow('facecont1');">
							<div class="face clearfix"> <span class="icon" onclick="hideshow('facecont1');"></span> <span class="select" ><a onclick="hideshow('facecont1');">更多表情</a></span> </div>
							<div id="facecont1" class="face-list-div" style="display:none;">
								<div class="face-close" title="关闭" onclick="hideshow('facecont1');"></div>
								<ul class="face-nav">
									<li><a href="#face_QQ"><span>QQ表情</span></a></li>
								</ul>
								<div id="face_QQ">
									<div>
										<div class="face-subnav">
											<ul>
												<li><a href="images/face/QQ01.html"><span>1</span></a></li>
												<li><a href="images/face/QQ02.html"><span>2</span></a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
						</div>
							<div>
								<textarea name="feedbackContent" id="feedbackContent"></textarea></div>
							</div>
							<div class="userbox">
								<dl>
									<dd style="display:none;"> 用户名
										<input name="feedbackName" id="feedbackName" class="username" type="text" maxlength="20" />
									</dd>
									<dd> 验证码 <input name="feedbackCode" id="feedbackCode" class="code" type="text" maxlength="6" style="ime-mode:disabled;" onpaste="return false" />
										<img onclick="this.src=jcms$$SetUrlRefresh('{site.Dir}plus/getcode3.aspx');" src="{site.Dir}plus/getcode3.aspx" align="absmiddle" style="cursor: pointer" alt="不区分大小写,点击换一张" title="不区分大小写,点击换一张" /><img id="imgRead" src="{site.Dir}publicstyle/maintb.gif" align="absmiddle" style="cursor: pointer" alt="收听验证码" title="收听验证码" onclick="PlayCodeVoice('player');" /><span id="player"></span></dd>
									<dd class="mtop">
										<input type="button" id="btnFeedbackAdd" name="btnFeedbackAdd" onclick="ajaxPluginFeedbackAdd();" value="" class="s" />
									</dd>
								</dl>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<div class="floatclear">
			<!--清除浮动-->
		</div>
	</div>
	<!--页面底部-->
	<div class="footer pbody margintop5">
		<div class="copyright">
			<div style="font-size:12px;margin-top:10px;">
				<div id="ajaxCopyright">Powered by JumbotCms &copy;2009. </div>
				<script>ajaxCopyright("ajaxCopyright");</script>
				<script type="text/javascript" src="{site.Dir}_data/style/count.js"></script>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">ajaxLoginbar(0);</script>
</body>
</html>
